\subsection{Definition of limit}
\begin{definition}
	We say that the sequence \(a_n \to a\) as \(n \to \infty\) if given \(\varepsilon > 0\), \(\exists N\) such that \(\abs{a_n - a} < \varepsilon\) for all \(n \geq N\).
	Note that this \(N\) is actually a function of \(\varepsilon\); we may need to choose a very large \(N\) if the \(\varepsilon\) provided is very small, for instance.
\end{definition}
\begin{definition}
	An increasing sequence is a sequence for which \(a_n \leq a_{n+1}\), and a decreasing sequence is a sequence for which \(a_n \geq a_{n+1}\).
	Such increasing and decreasing sequences are called monotone.
	A strictly increasing sequence or a strictly decreasing sequence simply strengthens the inequalities to not include the equality case.
\end{definition}

\subsection{Fundamental axiom of the real numbers}
If we have some increasing sequence \(a_n \in \mathbb R\), where \(\exists A \in \mathbb R\) such that \(\forall n \geq 1\), \(a_n \leq A\), then \(\exists a \in \mathbb R\) such that \(a_n \to a\) as \(n \to \infty\).
This is also known as the `least upper bound' axiom or property.
This axiom applies equivalently to decreasing sequences of real numbers bounded below.
We can also rephrase the axiom to state that every non-empty set of real numbers that is bounded above has a supremum.
\begin{definition}
	We say that the supremum \(\sup S\) of a non-empty, bounded above set \(S\) is \(K\) if
	\begin{enumerate}
		\item \(x \leq K\) for all \(x \in S\)
		\item given \(\varepsilon > 0\), \(\exists x \in S\) such that \(x > K - \varepsilon\)
	\end{enumerate}
\end{definition}
Note that the supremum (and hence the infimum) is unique.

\subsection{Properties of limits}
\begin{lemma}
	The following properties about real sequences hold.
	\begin{enumerate}
		\item The limit is unique.
		      That is, if \(a_n \to a\) and \(a_n \to b\), then \(a = b\).
		\item If \(a_n \to a\) as \(n \to \infty\) and \(n_1 < n_2 < \dots\), then \(a_{n_j} \to a\) as \(j \to \infty\).
		      In other words, subsequences converge to the same limit.
		\item If \(a_n = c\) for all \(n\), then \(a_n \to c\) as \(n \to \infty\).
		\item If \(a_n \to a\) and \(b_n \to b\), then \(a_n + b_n \to a + b\).
		\item If \(a_n \to a\) and \(b_n \to b\), then \(a_n b_n \to ab\).
		\item If \(a_n \to a\), \(a_n \neq 0\) for all \(n\), and \(a \neq 0\), then \(\frac{1}{a_n} \to \frac{1}{a}\).
		\item If \(a_n \to a\), and \(a_n \leq A\) for all \(n\), then \(a \leq A\).
	\end{enumerate}
\end{lemma}
\begin{proof}
	We prove the some of these statements here.
	\begin{enumerate}
		\item Given \(\varepsilon > 0\), \(\exists n_1\) such that \(\abs{a_n - a} < \varepsilon\) for all \(n \geq n_1\), and \(\exists n_2\) such that \(\abs{a_n - b} < \varepsilon\) for all \(n \geq n_2\).
		      So let \(N = \max(n_1, n_2)\), so both inequalities hold.
		      Then for all \(n \geq N\), using the triangle inequality, \(\abs{a - b} \leq \abs{a_n - a} + \abs{a_n - b} < 2\varepsilon\).
		      So \(a=b\).
		\item Given \(\varepsilon > 0\), \(\exists N\) such that \(\abs{a_n - a} < \varepsilon\) for all \(n \geq N\).
		      Since \(n_j \geq j\) (by induction), \(\abs{a_{n_j} - a} < \varepsilon\) for all \(j \geq N\).
		      \setcounter{enumi}{4}
		\item \(\abs{a_n b_n - ab} \leq \abs{a_n b_n - a_n b} + \abs{a_n b - ab} = \abs{a_n}\abs{b_n - b} + \abs{b}\abs{a_n - a}\).

		      If \(a_n \to a\), then given \(\varepsilon > 0\), \(\exists N_1\) such that \(\abs{a_n - a} < \varepsilon\) for all \(n \geq N_1\).
		      (\(\ast\))

		      If \(b_n \to b\), then given \(\varepsilon > 0\), \(\exists N_2\) such that \(\abs{b_n - b} < \varepsilon\) for all \(n \geq N_2\).

		      Using (\(\ast\)), if \(n \geq N_1(1)\) (i.e.\ \(\varepsilon = 1\)), \(\abs{a_n - a} < 1\), so \(\abs{a_n} \leq \abs{a} + 1\).

		      Therefore \(\abs{a_n b_n - ab} \leq \varepsilon(\abs{a} + 1 + \abs{b})\) for all \(n \geq N_3(\varepsilon) = \max\{ N_1(1), N_1(\varepsilon), N_2(\varepsilon) \}\).
	\end{enumerate}
\end{proof}

\subsection{Harmonic series}
\begin{lemma}
	The sequence \(\frac{1}{n}\) tends to zero as \(n \to \infty\).
\end{lemma}
\begin{proof}
	We know that \(\frac{1}{n}\) is a decreasing sequence, and it is bounded below by zero.
	Hence it converges to a limit \(a\).
	We will prove now that \(a = 0\).
	\(\frac{1}{2n} = \frac{1}{2}\cdot \frac{1}{n}\), and by property (v) above, \(\frac{1}{2n}\) tends to \(\frac{1}{2}\cdot a\).
	But \(\frac{1}{2n}\) is a subsequence of \(\frac{1}{n}\), and so by property (ii) it converges to \(a\).
	So by property (i), \(\frac{1}{2} \cdot a = a\) hence \(a=0\).
\end{proof}

\subsection{Limits in the complex plane}
\begin{remark}
	The definition of the limit of a sequence makes perfect sense for \(a_n \in \mathbb C\).
\end{remark}
\begin{definition}
	\(a_n \to a\) if given \(\varepsilon > 0\), \(\exists N\) such that \(\forall n \geq N\), \(\abs{a_n - a} < \varepsilon\).
\end{definition}
From this definition, it is easy to check that properties (i)--(vi) hold for complex numbers.
% chktex 36

However, property (vii) makes no sense in the world of the complex numbers since they do not have an ordering.

\subsection{The Bolzano--Weierstrass theorem}
\begin{theorem}
	If \(x_n\) is a sequence of real numbers, and there exists some \(k\) such that \(\abs{x_n} \leq k\) for all \(n\), then we can find \(n_1 < n_2 < n_3 < n_4 < \dots\) and \(x \in \mathbb R\) such that \(x_{n_j} \to x\) as \(j \to \infty\).
	In other words, any bounded sequence has a convergent subsequence.
\end{theorem}
\begin{remark}
	This theorem does not state anything about the uniqueness of such a subsequence; indeed, there could exist many subsequences that have possibly different limits.
	For example, \(x_n = (-1)^n\) gives \(x_{2n+1} \to -1\) and \(x_{2n} \to 1\).
\end{remark}
\begin{proof}
	Let \([a_1, b_1]\) be the range of the sequence, i.e.\ \([-k, k]\).
	Then let the midpoint \(c_1 = \frac{a_1 + b_1}{2}\).
	Consider the following alternatives:
	\begin{enumerate}
		\item \(x_n \in [a_1, c]\) for infinitely many values of \(n\).
		\item \(x_n \in [c, b_1]\) for infinitely many values of \(n\).
	\end{enumerate}
	Note that cases 1 and 2 could hold at the same time.
	If case 1 holds, we set \(a_2 = a_1\) and \(b_2 = c\).
	If case 1 fails, then case 2 must hold, so we can set \(a_2 = c\) and \(b_2 = b_1\).
	We have now constructed a subsequence whose range is half as large as the original sequence, and it contains infinitely many values of \(x_n\).

	We can proceed inductively to construct sequences \(a_n, b_n\) such that \(x_m \in [a_n, b_n]\) for infinitely many values of \(m\).
	This is known as a `bisection method'.
	By construction, \(a_{n-1} \leq a_n \leq b_n \leq b_{n-1}\).
	Since we are dividing by two each time,
	\[
		b_n - a_n = \frac{1}{2}(b_{n-1} - a_{n-1}) \tag{\(\ast\)}
	\]
	Note that \(a_n\) is a bounded, increasing sequence; and \(b_n\) is a bounded, decreasing sequence.
	By the Fundamental Axiom of the Real Numbers, \(a_n\) and \(b_n\) converge to limits \(a \in [a_1, b_1]\) and \(b \in [a_1, b_1]\).
	Using \((\ast)\), \(b-a = \frac{b-a}{2} \implies b = a\).

	Since \(x_m \in [a_n, b_n]\) for infinitely many values of \(m\), having chosen \(n_j\) such that \(x_{n_j} \in [a_j, b_j]\), there is \(n_{j+1} > n_j\) such that \(x_{n_{j+1}} \in [a_{j+1}, b_{j+1}]\).
	Informally, this works because we have an unlimited supply of such \(x\) values.
	Hence
	\[
		a_j \leq x_{n_j} \leq b_j
	\]
	So this \(x_{n_j} \to a\), so we have constructed a convergent subsequence.
\end{proof}

\subsection{Cauchy sequences}
\begin{definition}
	A sequence \(a_n\) is called a Cauchy sequence if given \(\varepsilon > 0\) there exists \(N > 0\) such that \(\abs{a_n - a_m} < \varepsilon\) for all \(n, m \geq N\).
	Informally, the terms of the sequence grow ever closer together such that there are infinitely many consecutive terms within a small region.
\end{definition}
\begin{lemma}
	If a sequence converges, it is a Cauchy sequence.
\end{lemma}
\begin{proof}
	If \(a_n \to a\), given \(\varepsilon > 0\) then \(\exists N\) such that \(\forall n \geq N, \abs{a_n - a} < \varepsilon\).
	Then take \(m, n \geq N\), and we have
	\[
		\abs{a_n - a_m} \leq \abs{a_n - a} + \abs{a_m - a} < 2\varepsilon
	\]
\end{proof}
\begin{theorem}
	Every Cauchy sequence converges.
\end{theorem}
\begin{proof}
	First, we note that if \(a_n\) is a Cauchy sequence then it is bounded.
	Let us take \(\varepsilon = 1\), so \(N = N(1)\) in the Cauchy property.
	Then
	\[
		\abs{a_n - a_m} < 1
	\]
	for all \(m, n \geq N(1)\).
	So by the triangle inequality,
	\[
		\abs{a_m} \leq \abs{a_m - a_N} + \abs{a_N} < 1 + \abs{a_N}
	\]
	So the sequence after this point is bounded by \(1 + \abs{a_N}\).
	The remaining terms in the sequence are only finitely many, so we can compute the maximum of all of those terms along with \(1+\abs{a_N}\) to produce a bound \(k\) for all \(n\).

	By the Bolzano--Weierstrass Theorem, this sequence \(a_n\) has a convergent subsequence \(a_{n_j} \to a\).
	We want to prove that \(a_n \to a\).
	Given \(\varepsilon > 0\), there exists \(j_0\) such that \(\abs{a_{n_j} - a} < \varepsilon\) for all \(j \geq j_0\).
	Also, \(\exists N(\varepsilon)\) such that \(\abs{a_m - a_n} < \varepsilon\) for all \(m, n \geq N(\varepsilon)\).
	Combining these, we can take a \(j\) such that \(n_j \geq \max \{ N(\varepsilon), n_{j_0} \}\).
	Then, if \(n \geq N(\varepsilon)\), using the triangle inequality,
	\[
		\abs{a_n - a} \leq \abs{a_n - a_{n_j}} + \abs{a_{n_j} - a} < 2\varepsilon
	\]
\end{proof}
Therefore, on \(\mathbb R\), a sequence is convergent if and only if it is a Cauchy sequence.
This is sometimes referred to as the general principle of convergence, however this is a relatively old-fashioned name.
This property is very useful, since we don't need to know what the limit actually is.
